package com.fqgj.xjd.user.dao.impl;
import com.fqgj.common.base.AbstractBaseMapper;
import com.fqgj.xjd.user.dao.UserBehaviorLoginDao;
import com.fqgj.xjd.user.entity.UserBehaviorLoginEntity;
import org.springframework.stereotype.Repository;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
* User: frank
* Date: 2020-07-27
* Time: 17:48:26.799
*/

@Repository
public class UserBehaviorLoginDaoImpl extends AbstractBaseMapper<UserBehaviorLoginEntity> implements UserBehaviorLoginDao {


    @Override
    public UserBehaviorLoginEntity queryUserLatestBehaviorLogin(String userCode) {
        Map params = new HashMap();
        params.put("userCode",userCode);
        return getSqlSession().selectOne(getStatement("queryUserLatestBehaviorLogin"),params);
    }

    @Override
    public List<UserBehaviorLoginEntity> queryUserLoginList(String userCode, String appCode, String packageName) {
        Map params = new HashMap();
        params.put("userCode",userCode);
        params.put("appCode",appCode);
        params.put("packageName",packageName);
        return getSqlSession().selectList(getStatement("queryUserLoginList"),params);
    }
}